<link rel="stylesheet" href="assets/user/css/goods.css">
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="widget-head">
				<div class="widget-title layer-cf">添加代理</div>
			</div>
			<form id="my-form" class="layer-form tpl-form-line-form" method="post">
				<div class="widget-body layui-col-lg12">
					<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">

						<div class="layui-tab-content">
							<div class="layui-tab-item layui-show">
								<div class="layer-form-group">
									<label class="layui-form-label form-require">名称：</label>
									<div class="layui-col-sm2  layer-midd-left">
										<input type="text" class="tpl-form-input" name="setup_daili_name" value="{$goodsInfo['setup_daili_name'] ?? ''}" required>
									</div>
								</div>

								<div class="layer-form-group">
									<label class="layui-form-label form-require">金额：</label>
									<div class="layui-col-sm2  layer-midd-left">
										<input type="text" class="tpl-form-input" name="setup_daili_price" value="{$goodsInfo['setup_daili_price'] ?? ''}" required>
									</div>
								</div>

								<div class="layer-form-group">
									<label class="layui-form-label form-require">排序：</label>
									<div class="layui-col-sm2  layer-midd-left">
										<input type="text" class="tpl-form-input" name="state" value="{$goodsInfo['state'] ?? ''}" required>
									</div>
								</div>
							</div> 

							<div class="layui-tab-item">
								<table class="table table-bordered attr" id="goods_attr_table" style="width:80%;">

								</table>
							</div>
						</div>
					</div>
					<div class="layer-form-group">
						<div class="layui-col-sm7  layer-u-sm-push-3 layer-margin-top-lg">
							 <input type="hidden"  value="{$goodsInfo['cat_id']??''}"  lay-filter="tree" class="layui-input catid">
							<button type="submit" class="j-submit layui-btn layer-btn-secondary">提交
							</button>
						</div>
					</div>
				</div>
            </form>
        </div>
    </div>
</div>
<!-- 图片文件列表模板 -->

<!-- 文件库弹窗 -->
{include file="layouts/_template/file_library" /}
{include file="item/_template/spec_many" /}
<script src="assets/user/js/goods.spec.js"></script>
<script>
var cat_id="{$goodsInfo['cat_id']??''}";
</script>
<script src="assets/user/js/goods.category.js"></script>
<script>
    $(function () {
        // 富文本编辑器
        layui.use('layedit', function(){
            var layedit = layui.layedit;
            layedit.build('container', {
                height: 600, //设置编辑器高度
                uploadImage: {
                    url: '/index.php?s=/user/upload/upload' //接口url
                    , type: 'post' //默认post
                }
            });
        });

        // 选择图片
        $('.j-withdraw_apply').selectImages({
            name: 'goods[goods_images][]'
            , multiple: true
        });
        //地址的定位
        layui.use('element', function(){
            var $ = layui.jquery
                ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

        });
        /**
         * 表单验证提交
         * @type {*}
         */
        $('#my-form').superForm();
    });

</script>